package com.example.demo.dao;

import com.example.demo.entity.ArticleInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ArticleInfoMapper {
    //int deleteByPrimaryKey(String username);

    //int insert(ArticleInfoVO record);

    //int insertSelective(ArticleInfoVO record);

    //ArticleInfoVO selectByPrimaryKey(String username);

    //int updateByPrimaryKeySelective(ArticleInfoVO record);

    //int updateByPrimaryKey(ArticleInfoVO record);

    //插入文章信息选择性
    boolean addArticle(ArticleInfoVO articleInfoVO);

    //按照主键删除文章
    boolean deleteArticleById(@Param("id") Integer id);

    //修改文章信息选择性
    boolean updateArticle(ArticleInfoVO articleInfoVO);

    //根据文章名称模糊查询
    List<ArticleInfoVO> getArticleByName(@Param("title") String title);

    //查询文章列表
    List<Map<String, Object>> articleList(@Param("label") String label, @Param("subLabel") String subLabel, @Param("author") String author, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

}